Answer: There have to be 13 vertices with same color on a 5x5 grid. Which means that at least 3 rows have to have 3 or more vertices of same color
(4 or 5 vertices of same color in a row can easily be ruled out because then you can't place enough on other rows without forming a rectangle)
. Amongst these 3 rows, show that at least two rows have to have vertices of same color in at least 2 positions, which means those form a rectangle.